//
//  JMLayoutView.h
//  NewiOSProject
//
//  Created by li on 2023/9/4.
//  Copyright © 2023 范智渊. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    LayoutViewAlignmentLeft,
    LayoutViewAlignmentCenter,
    LayoutViewAlignmentRight,
    LayoutViewAlignmentTop,
    LayoutViewAlignmentBottom,
    LayoutViewAlignmentTopLeft,
    LayoutViewAlignmentTopRight,
    LayoutViewAlignmentBottomLeft,
    LayoutViewAlignmentBottomRight
} LayoutViewAlignment;

@interface LayoutView : UIView

@property(nonatomic, strong) UIStackView *contentView;
@property(nonatomic, strong) UIColor *contentViewBackgroundColor;
@property(nonatomic, strong) UIImageView *contentBackgroundView;

@property(nonatomic, strong, nullable) NSLayoutConstraint *leftMargin;
@property(nonatomic, strong, nullable) NSLayoutConstraint *rightMargin;
@property(nonatomic, strong, nullable) NSLayoutConstraint *topMargin;
@property(nonatomic, strong, nullable) NSLayoutConstraint *bottomMargin;
@property(nonatomic, assign) UIEdgeInsets padding;
@property(nonatomic, assign) LayoutViewAlignment layoutViewAlignment;

- (void)addContentViews:(NSArray<UIView *> *)subViews;
- (void)addContentView:(UIView *)subView;
- (NSSet<UIView *> *)removeAllContentArrangeViews;
-(NSInteger)indexOf:(UIView *)subView;
@end

NS_ASSUME_NONNULL_END
